package com.ethan.crm.web.controller;

import com.ethan.crm.page.PageResult;
import com.ethan.crm.query.PermissionQueryObject;
import com.ethan.crm.service.IPermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class PermissionController {

    @Autowired
    private IPermissionService permissionService;


    @RequestMapping("/permission_list")
    @ResponseBody
    public PageResult getPermissionList(PermissionQueryObject qo){
        return permissionService.queryForPage(qo);
    }

    @RequestMapping("/query_permissionByRid")
    @ResponseBody
    public PageResult queryPermissionByRid(PermissionQueryObject qo){
        return permissionService.queryForPage(qo);
    }

    @RequestMapping("/permission")
    public String index(){
        return "permission";
    }


}
